/**
 * Created by Wing on 2017/5/19.
 */
Date.prototype.toString = function () {
    var d = this;
    var year = this.getFullYear();
    var month = this.getMonth()+1;
    var date = this.getDate();
    var hours = this.getHours();
    var minutes = this.getMinutes();
    var seconds = this.getSeconds();
    var result = ""+year;
    result += "-";
    if(month<10){
        result += "0"+month;
    }else{
        result += month;
    }
    result += "-";
    if(date<10){
        result += "0"+date;
    }else{
        result += date;
    }
    result += " ";
    if(hours<10){
        result += "0"+hours;
    }else{
        result += hours;
    }
    result += ":";
    if(minutes<10){
        result += "0"+minutes;
    }else{
        result += minutes;
    }
    result += ":";
    if(seconds<10){
        result += "0"+seconds;
    }else{
        result += seconds;
    }

    return result;
}